import { Component, OnInit } from '@angular/core';

import { RecentlyDocumentsService } from './recently-documents.service';

@Component({
  selector: 'app-recently-documents',
  templateUrl: './recently-documents.component.html',
  styleUrls: ['./recently-documents.component.scss']
})
export class RecentlyDocumentsComponent implements OnInit {

  documents = [];

  constructor(private recentlyDocumentsService: RecentlyDocumentsService) { }

  ngOnInit() {
    this.recentlyDocumentsService.getDocuments().subscribe(docs => this.documents = docs);
  }

}
